package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: twer
 * Date: 5/15/13
 * Time: 4:58 PM
 * To change this template use File | Settings | File Templates.
 */
public class Book {
    private int id;
    private int customerId = -1;
    private boolean isAvailable = true;
    private String title;

    Book(int id, String title) {
        this.id = id;
        this.title = title;
    }

    public boolean isAvailable() {
        return isAvailable;
    }

    public void setAvailable(boolean isAvailable) {
        this.isAvailable = isAvailable;
    }

    public String toString() {
        return id + "\t" + title + " - " + (isAvailable ? "Available" : "Unavailable");
    }

    public int getCustomerId() {
        return customerId;
    }

    public void setCustomerId(int customerId) {
        this.customerId = customerId;
    }
}
